home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 5087 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.5 KB

  1. Path: news1.h1.usa.pipeline.com!usenet
  2. From: grantp@usa.pipeline.com(Pete)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: C++ and dynamic loading of libraries
  5. Date: 2 Feb 1996 12:34:48 GMT
  6. Organization: Kalevi, Inc.
  7. Message-ID: <4et0d8$dlc@news1.usa.pipeline.com>
  8. NNTP-Posting-Host: pipe10.h1.usa.pipeline.com
  9. X-PipeUser: grantp
  10. X-PipeHub: usa.pipeline.com
  11. X-PipeGCOS: (Pete)
  12. X-Newsreader: Pipeline USA v3.3.0
  13.  
  14. On Feb 01, 1996 09:06:31 in article <C++ and dynamic loading of libraries>,
  15. 'u19809@kb.be (Wim Delvaux)' wrote: 
  16.  
  17.  
  18. >I would like to be able to load libraries generated from C++ from 
  19. >other C++ code.  This is not a big problem but I would like to use the 
  20. >libraries ON DEMAND ie. when the application needs it and not at 
  21. >compile time. (Using LOADLIBRARY/FINDSYMBOL api calls of the dynamic 
  22. >loader components of several OS-ses : Windows, Linux, Unix, ...) 
  23. >There is however the problem of the name mangling : What is the name 
  24. >of the C++ function I need ?   
  25. >Does there exist (compiler-specific) API's to mangle/demangle that can 
  26. >be used from within an application ? 
  27. >Does anybody have other suggestions how to do this ? 
  28.  
  29. Read up on extern "C" declaration.  It's covered in the 
  30. FAQ as well as your compiler documentation.  But that  
  31. only suppresses C++ name mangling -- it doesn't have 
  32. anything to do with wether or not the library is static 
  33. or dynamic.  If your library calls work OK when the lib 
  34. is statically linked, they should work OK when using 
  35. dynamic linking also. 
  36.  
  37. -- 
  38. Pete Grant 
  39. Kalevi, Inc. 
  40. Object Oriented Software Development
  41.